package only.my.railgunys.weapon;

import only.my.railgunys.bean.Character;
import only.my.railgunys.bean.Weapon;

public class PrimordialJadeCutter extends Weapon {

    public int refineLevel;

    public PrimordialJadeCutter(int refineLevel){
        this.atk = 542.0;
        this.subStatValue = 44.1;
        this.refineLevel =refineLevel;
        this.name = "绿剑";
        this.code = 8;
    }

    @Override
    public Character subStatEnhance(Character character) {
        character.addCritRate(this.subStatValue);
        return character;
    }

    @Override
    public Character specialAbility(Character character) {
        character.addHp(character.getHp()*0.2);
        double totalHp = character.getHp() + character.getHp_ex();

        character.setAtk_ex(character.getAtk_ex()+totalHp * (0.012*(1+(refineLevel-1)*0.25)));
        return character;
    }
}
